package fuxi02_finally.test_try_catch_finally;

public class FinallyDemo_finally {

    public int finallyTest(){
        int c= 0;
        try {
            int a=6;
            int b=0;
            c = a/b;
//            ***面试题要点***
            System.exit(0);     //退出JVM
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            System.out.println("finally block");
        }
        return c;
    }

    public static void main(String[] args) {
//        实例化
        FinallyDemo_finally fd = new FinallyDemo_finally();
//        调用方法
        fd.finallyTest();
    }
}
